// 需要权限访问的完整路由表
// 获取权限后和该表匹配的则被加入到正式路由中。该表必须完整的包含工程页面
// path 页面跳转地址
// permission字段内容从后台获取，代表该页内部详细权限，以key:value形式存储

const asyncRouter = [
    /**
     * 原模块教程view
     */
    {
        path: '/asyncRouter',
        component: r => require.ensure([], () => r(require('../page/layout/layout')), 'layout'),
        children: []
    },
    {
        path: '/table',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/table/table')), 'table')
    },
    {
        path: '/form',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/form/form')), 'form'),
    },
    {
        path: '/components',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/components/index')), 'sysComponents'),
    },
    {
        path: '/components/permission',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/components/function/permission')), 'sysComponents'),
    },
    {
        path: '/components/pageTable',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/components/function/pageTable')), 'sysComponents'),
    },
    {
        path: '/components/pageSearch',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/components/ui/pageSearch')), 'sysComponents'),
    },
    {
        path: '/components/pageSection',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/components/ui/pageSection')), 'sysComponents'),
    },
    {
        path: '/components/pageTitle',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/components/ui/pageTitle')), 'sysComponents'),
    },
    {
        path: '/components/pageToolbar',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/components/ui/pageToolbar')), 'sysComponents'),
    },
    {
        path: '/components/pageNotes',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/components/assist/pageNotes')), 'sysComponents'),
    },
    {
        path: '/example/detail',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/example/table')), 'example'),
    },
    {
        path: '/example/charts',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/example/charts')), 'example'),
    },
    {
        path: '/example/map',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/example/map')), 'example'),
    },
    {
        path: '/i18n',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/i18n/i18n')), 'i18n'),
    },
    /**
     * 自建view层
     */
    // orderInfo
    {
        path: '/orderInfo/list',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/orderInfo/list')), 'sysComponents'),
    },
    {
        path: '/orderInfo/new',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/orderInfo/new')), 'sysComponents'),
    },
    {
        path: '/orderInfo/add',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/orderInfo/add')), 'sysComponents'),
    },
    {
        path: '/orderInfo/edit',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/orderInfo/edit')), 'sysComponents'),
    },
    {
        path: '/orderInfo/detail',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/orderInfo/detail')), 'sysComponents'),
    },
    // assessMonth
    {
        path: '/assessMonth/list',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/assessMonth/list')), 'sysComponents'),
    },
    {
        path: '/assessMonth/detail',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/assessMonth/detail')), 'sysComponents'),
    },
    {
        path: '/assessMonth/state',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/assessMonth/state')), 'sysComponents'),
    },
    // userInfo
    {
        path: '/userInfo/normal',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/userInfo/normal')), 'sysComponents'),
    },
    {
        path: '/userInfo/modify',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/userInfo/modify')), 'sysComponents'),
    },
    // orderAudit
    {
        name: 'orderAudit/list',
        path: '/orderAudit/list',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/orderAudit/list')), 'sysComponents'),
    },
    {
        name: 'orderAudit/detail',
        path: '/orderAudit/detail',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/orderAudit/detail')), 'sysComponents'),
    },
    // assessScore
    {
        path: '/assessScore/list',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/assessScore/list')), 'sysComponents'),
    },
    {
        path: '/assessScore/detail',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/assessScore/detail')), 'sysComponents'),
    },
    {
        path: '/assessScore/state',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/assessScore/state')), 'sysComponents'),
    },
    //userManage
    {
        path: '/userManage/list',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/userManage/list')), 'sysComponents'),
    },
    {
        path: '/userManage/new',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/userManage/new')), 'sysComponents'),
    },
    //itemManage
    {
        path: '/itemManage/list',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/itemManage/list')), 'sysComponents'),
    },
    {
        path: '/itemManage/new',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/itemManage/new')), 'sysComponents'),
    },
    //assessQuery
    {
        path: '/assessQuery',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/assessQuery/list')), 'theme'),
    },
    //overtimeState
    {
        path: '/overtimeState',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/overtimeState/list')), 'theme'),
    },
    //branchManage
    {
        path: '/branchManage/list',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/branchManage/list')), 'sysComponents'),
    },
    {
        path: '/branchManage/new',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/views/branchManage/new')), 'sysComponents'),
    },
    //theme
    {
        path: '/theme',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/themeChange/themeChange')), 'theme'),
    }

]

export default asyncRouter